
package com.fire.web.modules.all.service.impl;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.fire.web.modules.all.entity.AjaxResult;
import com.fire.web.modules.all.entity.AllUserModel;
import com.fire.web.modules.all.mapper.AllUserMapper;
import com.fire.web.modules.all.request.AddUserReq;
import com.fire.web.modules.all.service.IAllUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户Service
 *
 * @author Matthew
 * @Date 2019-01-10 11:32
 */
@Service
public class AllUserServiceImpl extends ServiceImpl<AllUserMapper, AllUserModel> implements IAllUserService {

	private static final Logger LOGGER = LoggerFactory.getLogger(AllUserServiceImpl.class);

	@Autowired
	private AllUserMapper allUserMapper;


	@Override
	public AllUserModel selectOne(AllUserModel entity) {
		return allUserMapper.selectOne(entity);
	}

	@Override
	public List<AllUserModel> selectList(AllUserModel model) {
		return allUserMapper.selectList(model, new EntityWrapper<AllUserModel>());
	}

	@Override
	public List<AllUserModel> selectList(AllUserModel model, Wrapper<AllUserModel> wrapper) {
		return allUserMapper.selectList(model, wrapper);
	}

	@Override
	public List<AllUserModel> selectPage(Pagination pagination, AllUserModel model, Wrapper<AllUserModel> wrapper) {
		return allUserMapper.selectPage(pagination, model, wrapper);
	}

	@Override
	public AjaxResult addUser(String json) {
		AddUserReq addUserReq = JSON.parseObject(json, AddUserReq.class);
		//addUserReq
		return null;
	}

}
